<template>
  <div>
    <NavBar class="nav-bar">
      <div slot="center">超级商场</div>
    </NavBar>
    <div class="user-info">
      <img class="avatar" src="~assets/img/profile/avatar.svg" alt="" />
      <div class="info">
        <div class="login">登录/注册</div>
        <div class="phone">
          <img src="~assets/img/profile/phone.svg" alt="" />
          <span>暂无绑定手机号</span>
        </div>
      </div>

      <img src="~assets/img/common/arrow-left.svg" alt="" />
    </div>
    <div class="jifen">
      <div class="jifenitem">
        <span class="red">0.00</span> 元

        <p>我的余额</p>
      </div>
      <div class="jifenitem">
        <span class="red">0.00</span>
        个
        <p>我的优惠</p>
      </div>
      <div class="jifenitem">
        <span class="red">0.00</span>
        分
        <p>我的积分</p>
      </div>
      <div class="jifenitem">
        <span class="red">{{ collectNum }}</span
        >个

        <p>我的收藏</p>
      </div>
    </div>
    <ul class="list">
      <li class="item">
        <img src="~assets/img/profile/message.svg" alt="" />
        <span class="info">我的消息</span>
      </li>
      <li class="item">
        <img src="~assets/img/profile/message.svg" alt="" />
        <span class="info">我的消息</span>
      </li>
      <li class="item">
        <img src="~assets/img/profile/message.svg" alt="" />
        <span class="info">我的消息</span>
      </li>
      <li class="item">
        <img src="~assets/img/profile/message.svg" alt="" />
        <span class="info">我的消息</span>
      </li>

    </ul>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "ProfileIndex",

  data() {
    return {};
  },

  mounted() {},
  computed: {
    ...mapGetters(["collectNum"]),
  },
  methods: {},
};
</script>

<style lang="less" scoped>
.user-info {
  display: flex;
  align-items: center;
  background: var(--color-tint);
  padding: 6px 15px;
  color: #fff;
  .avatar {
    width: 70px;
    height: 70px;
  }
  .phone {
    margin-left: -5px;
  }
  img {
    width: 20px;
    height: 30px;
  }
  .info {
    flex: 1;
  }
}
.jifen {
  display: flex;
  align-items: center;
  text-align: center;
  .jifenitem {
    flex: 1;
    padding: 2px;
  }
  span {
    color: #ff5f3e;
    font-weight: bold;
    font-size: 20px;
  }
}
.list {
  .item {
    height: 44px;
    line-height: 44px;
    padding: 10px;
    border-bottom: 1px solid #eee;
  }
  img {
    width: 20px;
    height: 20px;
  }
  span {
    margin-left: 5px;
  }
}
</style>
